#ifndef MIDI_H
#define MIDI_H
//http://www.sonicspot.com/guide/midifiles.html
namespace smf {
// MIDI Channel events
//Note Off              0x8	note number             velocity
//Note On               0x9	note number             velocity
//Note Aftertouch	0xA	note number             aftertouch value
//Controller            0xB	controller number	controller value
//Program Change	0xC	program number          not used
//Channel Aftertouch	0xD	aftertouch value	not used
//Pitch Bend            0xE	pitch value (LSB)	pitch value (MSB)
//
// variable-length delta 4 bits	4 bits	1 byte	1 byte

enum EventType {
    k_note_off              = 0x80,
    k_note_on               = 0x90,
    k_note_aftertouch       = 0xA0,
    k_controller            = 0xB0,
    k_program_change        = 0xC0,
    k_channel_aftertouch    = 0xD0,
    k_pitch_bend            = 0xE0,
    k_meta_event            = 0xFF,
    k_type_mask             = 0xF0,
    k_channel_mask          = 0x0F
};

//Meta Event	Type	Length              Data
//255 (0xFF)	0-255	variable-length     type specific

enum MetaEventType {
    k_meta_sequence_number       = 0x00,
    k_meta_text                  = 0x01,
    k_meta_copyright            = 0x02,
    k_meta_sequence_track_name            = 0x03,
    k_meta_instrument_name        = 0x04,
    k_meta_lyrics    = 0x05,
    k_meta_marker            = 0x06,
    k_meta_cue            = 0x07,
    k_meta_MIDI_channel_prefix            = 0x20,
    k_meta_end_of_track            = 0x2F,
    k_meta_tempo=0x51,
    k_meta_smpte_offset=0x54,
    k_meta_time_signature=0x58,
    k_meta_key_signature=0x59,
    k_meta_sequencer_specific=0x7F
};
#endif // MIDI_H
